package service;

import domain.Permission;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Freedy
 * @date 2020/12/26 10:33
 */

public interface IPermissionService {

    /**
     * 查询所有
     * @return
     * @throws Exception
     */
    List<Permission> findAll() throws Exception;

    /**
     * 保存
     * @param permission
     * @throws Exception
     */
    void save(Permission permission) throws Exception;

    /**
     * 删除权限
     * @param permissionId
     * @throws Exception
     */
    void deletePermission(String permissionId) throws Exception;

    /**
     * 查询出自己没有的
     * @param id
     * @return
     * @throws Exception
     */
    List<Permission> findAllWithOutItself(String id) throws Exception;

    /**
     * 根据id查询
     * @param permissionId
     * @return
     * @throws Exception
     */
    Permission findById(String permissionId) throws Exception;
}
